<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('申请开票列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>项目名称：</label>
                                <input type="text" autoComplete="off" name="projectName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="gcgl:qrsk:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
	    var removeFlag = [[${@permission.hasPermi('gcgl:qrsk:remove')}]];
	    var prefix = ctx + "gcgl/qrsk";
	
	    $(function() {
	        var options = {
	            url: prefix + "/list4lis",
	            //updateUrl: prefix + "/edit/{id}",
	            removeUrl: prefix + "/remove",
	            modalName: "确认收款",
	            columns: [{
	                checkbox: true
	            },
	            {
	                field: 'id',
	                title: '主键',
	                visible: false
	            },
	            {
	                field: 'gcProjectid',
	                title: '合同ID',
	                visible: false
	            },
	            {
	                field: 'sqkpId',
	                title: '申请开票ID'
	            },
	            {
	                field: 'projectName',
	                title: '项目名称'
	            },
	            {
	                field: 'htje',
	                title: '合同金额'
	            },
	            {
	                field: 'type',
	                title: '类型'
	            },
	            {
	                field: 'bcsqkpje',
	                title: '本次申请开票金额'
	            },
	            {
	                field: 'qrjine',
	                title: '确认收款金额'
	            },
	            {
	                field: 'skAt',
	                title: '收款时间'
	            },
	            {
	                field: 'fkdw',
	                title: '付款单位'
	            },
	            {
	                field: 'fkyh',
	                title: '付款银行'
	            },
	            {
	                field: 'skdw',
	                title: '收款单位'
	            },
	            {
	                field: 'skyh',
	                title: '收款银行'
	            },
	            {
	                field: 'dept',
	                title: '归属所'
	            },
	            {
	                field: 'memo',
	                title: '备注'
	            },
	            {
	                title: '操作',
	                align: 'center',
	                formatter: function(value, row, index) {
	                    var actions = [];
	                    //actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
	                    actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
	                    return actions.join('');
	                }
	            }]
	        };
	        $.table.init(options);
	    });
    </script>
</body>
</html>